package com.example.fitapp.activity.activity;

import android.app.Application;
import android.content.Context;
import android.graphics.Typeface;

import com.example.fitapp.activity.http.util.OkHttpUtil;

import java.lang.reflect.Field;

public class MyApplication extends Application {
    private static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
//        initType();
        OkHttpUtil.init();
    }

    public static Context getContext(){
        return context;
    }

//    private void initType(){
//        Typeface typeface = Typeface.createFromAsset(getAssets(),"fonts/PingFang SC Regular.tff");
//        Field field = null;
//        try {
//            field = Typeface.class.getDeclaredField("MONOSPACE");
//            field.setAccessible(true);
//            field.set(null,typeface);
//        } catch (NoSuchFieldException e) {
//            e.printStackTrace();
//        } catch (IllegalAccessException e) {
//            e.printStackTrace();
//        }
//    }


}
